SQLGetPos

 

The SQLGetPos function is a SQL function that gets the position of the current data field.

 

int @SQLGetPos(int id);

 

Parameters

int id : Access number connected by SQLConnect

 

Return Value

Returns the cursor position of the currently linked data.

 

Example1

pos = @SQLGetPos($AddrID);

 

Description : Assign the position value of the current data field to the pos variable (DWORD size).

 

Example2

id = @SQLConnect("ODBCDNSName","","");

@SQLSelect(id, "Table1","BindList","","");

@SQLFirst(id);

for (i=0; i < 3; i = i +1){

@SQLNext(id);

}

pos=@SQLGetPos(id);

@SQLDisconnect(id);

 

Description :

Let's assume that the number of records that correspond to the condition of SQLSelect is 10, so if you SQLNext 3 times in the for statement, the value of pos will be '0' if you do the first SQLFirst.

And after executing the for statement (if you do 3 times and pos=0+3), the value of pos will be 3.

 

Related Helps

SQLConnect()

SQLCreateTable()

SQLDelete()

SQLDisconnect()

SQLExecute()

SQLFirst()

SQLInsert()

SQLLast()

SQLNext()

SQLPrepare()

SQLPrev()

SQLSelect()

SQLSetPos()

SQLUpdate()